package com.department.mydepartment.util;

import org.json.JSONObject;
import org.springframework.stereotype.Service;

@Service
public class ShowData {

    /**
     * 展示返回信息
     * @param status
     * @param data
     * @return
     */
    public String showData (Boolean status, String data) {
        JSONObject jsonObject = new JSONObject();
        jsonObject.accumulate("status", status);
        jsonObject.accumulate("data", data);
        return jsonObject.toString();
    }
}
